$(document).ready(function() {
    fnVerificarSesion();
});
function fnVerificarSesion(){
    $.ajax({
        type: "POST",
        url: "verificarSesion",
        data: "",
        success: function(res) {      
            console.log(res);
           if(res>0){
               location.href='ventas.jsp';
           }
        },
        error: function(e) {
            console.log(e);
        }
    });
}

